<!DOCTYPE html>
<html>
<#include "../head.html">
    <body>
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="公告管理">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="toolbor-module export">
                                    <a href="addNotice.html" class="input-button">+新增公告</a>
                                </div>
                                <div class="toolbor-module search">
                                 	<div class="formTit">公告标题关键字：</div>
                                    <input type="text" name="searchTitle" id="searchTitle" class="search-value">
                                    <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                </div>
                            </div>
                            

                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                       		<td>ID</td>
                                            <td>标题</td>
                                            <td>内容</td>
                                            <td>跳转地址</td>
                                            <td>是否发布</td>
                                            <td>创建时间</td>
                                            <td>更新时间</td>
                                            <td>备注</td>
                                            <td>操作</td>                                    
                                        </tr>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item.id!0}</td>
                                                <td>${item.title!''}</td>
                                                <td>${item.content!''}</td>
                                                <td>${item.url!''}</td>
                                                <td>
                                                  <#if item.status==1>已发布<#else>草稿</#if>
                                                </td>                  
                                                <td>${(item.createdtime)?string("yyyy-MM-dd HH:mm:ss")}</td>
                                                <td>${(item.updatedtime)?string("yyyy-MM-dd HH:mm:ss")}</td>
                                                <td>${item.remark!''}</td>
                                                <td>                                                 	
                                                <a class="un" href="/admin/api/modifyNotice.html?id=${item.id?c}&page=${page.currentPage}&searchTitle=${searchTitle}">修改</a>
                                                                                             	
                                                    <#if item.status==1>
                                                       <a class="un" href="/admin/api/updateNotice.html?id=${item.id?c}&page=${page.currentPage}&searchTitle=${searchTitle}&status=0">关闭</a>
                                                  <#else>
                                                      <a class="un" href="/admin/api/updateNotice.html?id=${item.id?c}&page=${page.currentPage}&searchTitle=${searchTitle}&status=1">发布</a>
                                                  </#if>                                             
                                               </td>
                                            </tr>
                                        </#list>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>
                                 <!--翻页系统--{-->
                                    <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->
                                
                                
                                <script>
                                    var url = 'queryNotice.html?search=true';

                                    function sousuo(){
                                        var sou = "";
                                        var searchTitle = $("#searchTitle").val();
                                        if (searchTitle!=null&&searchTitle!=""&&searchTitle!="undefine"&&searchTitle!="请输入公告关键字"){
                                            sou += "&searchTitle="+searchTitle;
                                        }
                                        if (sou!=""){
                                            location.href=url+sou;
                                        }
                                    }
                                   
                                    $("#searchTitle")[0].defaultValue=getQueryString("title");
                            		function getQueryString(name){
                            			var reg=new  RegExp("(^|&)"+name+"=([^&]*)(&|$)");
                            			var r =window.location.search.substr(1).match(reg);
                            			if(r!=null)
                            				return  decodeURI(r[2]);
                            			return  "请输入标题关键字";
                            		}
                                </script>
                            </div>

            </div>
        </div>
        <div>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </div>
    </div>

    </body>
</html>
<#include "../jsPage.html">
